<%@ page import="auctionatr.User"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName"
	value="${message(code: 'user.label', default: 'User')}" />
<title><g:message code="default.create.label"
		args="[entityName]" />
</title>
</head>
<body>

	<div class="body">
		<h1>
			<g:message code="default.create.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<g:hasErrors bean="${userInstance}">
			<div class="errors">
				<g:renderErrors bean="${userInstance}" as="list" />
			</div>
		</g:hasErrors>
		<g:form action="save" method="post" enctype="multipart/form-data">
			<div class="dialog">
				<table>
					<tbody>

						<tr>
							<th valign="top" class="name" colspan="2"><g:message
									code="user.pflichtfeld.label" default="Username" /></th>
						</tr>
						<tr>
							<td></td>
							<td></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="username"><g:message code="user.username.label" default="Username" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'username', 'errors')}">
								<g:textField name="username" maxlength="50"
									value="${userInstance?.username}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="password"><g:message code="user.password.label" default="Password" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
								<g:passwordField name="password"
									value="${userInstance?.password}" /></td>
						</tr>


						<tr class="prop">
							<td valign="top" class="name"><label for="password2"><g:message code="user.password2.label" default="Password2" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'password2', 'errors')}">
								<g:passwordField name="password2"
									value="${userInstance?.password2}" /></td>
						</tr>


						<tr class="prop">
							<td valign="top" class="name"><label for="email"><g:message
										code="user.email.label" default="Email" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'email', 'errors')}">
								<g:textField name="email" value="${userInstance?.email}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="birthday"><g:message code="user.birthday.label" default="Birthday" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'birthday', 'errors')}">
								<g:datePicker name="birthday" precision="day"
									value="${userInstance?.birthday}" /></td>
						</tr>

						

						<tr class="prop">
							<td valign="top" class="name"><label for="firstName"><g:message code="user.firstName.label" default="First Name" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'firstName', 'errors')}">
								<g:textField name="firstName" value="${userInstance?.firstName}" />
							</td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="lastName"><g:message code="user.lastName.label" default="Last Name" /> <sup>*</sup>
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'lastName', 'errors')}">
								<g:textField name="lastName" value="${userInstance?.lastName}" />
							</td>
						</tr>
						
						<tr>
							<td></td>
							<td></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="street"><g:message
										code="user.street.label" default="Street" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'street', 'errors')}">
								<g:textField name="street" value="${userInstance?.street}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="zip"><g:message
										code="user.zip.label" default="Zip" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'zip', 'errors')}">
								<g:textField name="zip" value="${userInstance?.zip}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="city"><g:message
										code="user.city.label" default="City" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'city', 'errors')}">
								<g:textField name="city" value="${userInstance?.city}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="accountNumber"><g:message
										code="user.accountNumber.label" default="Account Number" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'accountNumber', 'errors')}">
								<g:textField name="accountNumber"
									value="${userInstance?.accountNumber}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="bankCode"><g:message code="user.bankCode.label" default="Bank Code" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'bankCode', 'errors')}">
								<g:textField name="bankCode" value="${userInstance?.bankCode}" />
							</td>
						</tr>

						<tr>
							<td></td>
							<td></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="aboutUser"><g:message
										code="user.aboutUser.label" default="About User" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'aboutUser', 'errors')}">
								<g:textField name="aboutUser" value="${userInstance?.aboutUser}" />
							</td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="facebookName"><g:message
										code="user.facebookName.label" default="Facebook Name" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'facebookName', 'errors')}">
								<g:textField name="facebookName"
									value="${userInstance?.facebookName}" /></td>
						</tr>



						<tr class="prop">
							<td valign="top" class="name"><label for="twitterName"><g:message
										code="user.twitterName.label" default="Twitter Name" />
							</label></td>
							<td valign="top"
								class="value ${hasErrors(bean: userInstance, field: 'twitterName', 'errors')}">
								<g:textField name="twitterName"
									value="${userInstance?.twitterName}" /></td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name"><label for="avatar"><g:message
										code="user.avatar.label" default="Avatar" /> 16kB, 4:3</label>
							</td>
							<td valign="top" class="value"><input type="file"
								name="avatar" id="avatar" />
							</td>
						</tr>

					</tbody>
				</table>
			</div>
			<div class="buttons">
				<span class="button"><g:submitButton action="save"
						name="create"
						value="${message(code: 'default.button.create.label', default: 'Create')}" />
				</span>
			</div>
		</g:form>
	</div>
</body>
</html>
